package pullObserver;

/**
 * Created by root on 2017/5/5.
 */
public class ConcreteSubject extends Subject{
    private String state;

    public String getState(){
        return state;
    }

    public void change(String newState){
        state = newState;
        System.out.println("主题状态改为：" + newState);
        // 专题发生改变，通知各个观察者
        this.nodifyObservers();
    }
}
